package ws.jdbc.concurrent.driver.sqlserver.cursor.individual

import static java.sql.ResultSet.*
import ws.jdbc.concurrent.driver.sqlserver.*

/**
 * Test case of CursorScrollableReadOnly class methods.
 * 
 * @author Wilson Santos, 36228 <wilson.santos@ua.pt>
 */
//class CursorScrollableReadOnlyTest extends ws.jdbc.concurrent.driver.sqlserver.cursor.CursorScrollableReadOnlyTest {
class CursorScrollableReadOnlyTest extends ScrollableReadOnlyTest {

  def crs

  /**
   * Run this before every test.
   */
  @Override
  void setUp() {
    super.setUp()

    stmt = con.createStatement(TYPE_SCROLL_SENSITIVE, CONCUR_READ_ONLY)
    crs = stmt.executeQuery(sqlQuery)
    rs = stmt.getCursor()

    assertNotNull rs
    assertTrue rs instanceof CursorScrollableReadOnly
  }

  void tearDown() {
    println "tearDown()"
    crs.close()
  }
}